const mysqlConnection = require('./mysqlconnect')

const getMenuList = function (params) {
    return new Promise(function (resolve, reject) {
        let selectSql = `SELECT * FROM manage`;
        //更新
        mysqlConnection.query(selectSql, function (err, result) {
            if (err) {
                console.log('[INSERT ERROR] - ', err.message);
                reject(err)
                return;
            }
            resolve({
                code: 0,
                status: 200,
                message: "success",
                data: result
            })
        });
    })
}

module.exports = {
    getMenuList
}